<template>
	<view class="googleModal">
		<u-modal :show="googleModalShow" title="谷歌令牌验证" :showConfirmButton="false"  showCancelButton @cancel="close">
			<view class="slot-content">
				<u-code-input v-model="googleCode" @finish="confirm"></u-code-input>
				<!-- <u-input placeholder="请输入验证码" border="surround" v-model="googleCode"></u-input> -->
			</view>
		</u-modal>
	</view>
</template>

<script>
	export default {
		name: "google-modal",
		props:{
			callbackfun:Function
		},
		data() {
			return {
				googleModalShow: false,
				googleCode: ''
			};
		},
		methods:{
			confirm(){
				this.callbackfun(this.googleCode);
				this.$closeGoogleModal()
			},
			close(){
				this.$closeGoogleModal()
			}
		}
	}
</script>

<style>

</style>